export const state = () => ({
  fromUrl: '/',
  redirect: '/',
  device: {}
})

export const mutations = {
  SET_FROM_RUL: (state, path) => {
    state.fromUrl = path
  },
  SET_REDIRECT_RUL: (state, path) => {
    state.redirect = path
  },
  SET_DEVICE_TYPE: (state, device) => {
    state.device = device
  }
}

export const actions = {
  async fromUrl({ commit }) {
    commit('SET_FROM_RUL', commit)
  },
  async redirectUrl({ commit }, redirectUrl) {
    commit('SET_REDIRECT_RUL', redirectUrl)
  }
}

export const getters = {
  get(state) {
    return state
  }
}
